<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">

    <f:view contentType="text/html">
        
        <h:head>
            <f:facet name="first">
                <meta http-equiv="X-UA-Compatible" content="IE=edge"></meta>
                <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
                <link href="resources/css/style.css" rel="stylesheet" type="text/css" />
                <link rel="shortcut icon" type="image/x-icon" href="resources/images/favicon.ico"/>
                <link rel="icon" type="image/x-icon" href="resources/images/favicon.ico"/>
                
                <link type="text/css" rel="stylesheet" href="https://www.gstatic.com/freebase/suggest/4_1/suggest.min.css" />

                <title>#{pagetitle}</title>
            </f:facet>
            

        </h:head>
        
        <h:body>
            
            <h:outputScript name="js/suggest.min.js" target="head"/>
            <h:outputStylesheet target="head" name="resources/css/suggest.min.css" />
            
            <f:facet name="last">
		<h:outputStylesheet library="default" name="resources/css/style.css" />
                
            </f:facet>

            <p:layout fullPage="true">

                <p:layoutUnit position="north" size="120" resizable="false" closable="false" collapsible="false">
                    <ui:insert name="headerContent">
                        
                        <ui:include src="header.xhtml" />
                        
                        
        
                        
                    </ui:insert>
                </p:layoutUnit>


                <p:layoutUnit position="west" size="261" collapsible="false">
                    <ui:insert name="leftContent">
                        
                        <p:dashboard disabled="true" id="dashboardTops" model="#{webResourceBean.topsDashboard}">
                            <p:panel style="margin-top: 20px;width:220px" collapsed="false" toggleable="true" toggleSpeed="300" id="topCourses" header="Top Courses">
                                <ui:include src="../../topCourses.xhtml" />
                            </p:panel>
                            
                            <p:panel style="margin-top: 20px;width:220px" collapsed="false" toggleable="true" toggleSpeed="300" id="topInstructors" header="Top Instructors">
                                <ui:include src="../../topInstructors.xhtml" />
                            </p:panel>
                            
                            <p:panel style="margin-top: 20px;width:220px" collapsed="false" toggleable="true" toggleSpeed="300" id="topInstitutions" header="Top Institutions">
                                <ui:include src="../../topInstitutions.xhtml" />
                            </p:panel>
                        </p:dashboard>     
                        
                    </ui:insert>
                </p:layoutUnit>


                <p:layoutUnit position="center">
                    <ui:insert name="centerContent">Center Content Template</ui:insert>
                </p:layoutUnit>


                <p:layoutUnit position="east" size="265" resizable="false" closable="false" collapsible="false">
                    
                    <ui:insert name="rightContent">
                        <p:dashboard rendered="#{!loginBean.isAdmin}" disabled="true" id="rightCoursesPanel" model="#{webResourceBean.rightCoursesPanel}">
                            <p:panel rendered="#{loginBean.isUser}" style="margin-top: 20px;width:230px" collapsed="false" toggleable="true" toggleSpeed="300" id="recommendedCourses" header="Recommended Courses">
                                <ui:include src="../../recommendedCourses.xhtml" />
                            </p:panel>
                            
                            <p:panel rendered="#{loginBean.isUser}" style="margin-top: 20px;width:230px" collapsed="false" toggleable="true" toggleSpeed="300" id="newCoursesSummary" header="New Courses">
                                <ui:include src="../../newCoursesSummary.xhtml" />
                            </p:panel>
                            
                            <p:panel rendered="#{!loginBean.loggedIn}" style="margin-top: 20px;width:230px" collapsed="false" toggleable="true" toggleSpeed="300" id="trendingCourses" header="Trending Courses">
                                <ui:include src="../../trendingCourses.xhtml" />
                            </p:panel>
                        </p:dashboard>     
                        
                        <p:dashboard rendered="#{loginBean.isAdmin}" disabled="true" id="rightAdminPanel" model="#{webResourceBean.rightAdminPanel}">
                            <p:panel style="margin-top: 20px;width:220px" collapsed="false" toggleable="true" toggleSpeed="300" id="newUsers" header="New Users">
                                <ui:include src="../../newUsers.xhtml" />
                            </p:panel>
                            
                            <p:panel style="margin-top: 20px;width:220px" collapsed="false" toggleable="true" toggleSpeed="300" id="newCourses" header="New Courses">
                                <ui:include src="../../newCourses.xhtml" />
                            </p:panel>
                            
                            <p:panel style="margin-top: 20px;width:220px" collapsed="false" toggleable="true" toggleSpeed="300" id="newVideos" header="New Institutions">
                                <ui:include src="../../newInstitutions.xhtml" />
                            </p:panel>
                        </p:dashboard>     
                        
                        
                    </ui:insert>
                </p:layoutUnit>

                
                <p:layoutUnit  position="south" size="60" resizable="false" closable="false" collapsible="false">
                    <ui:insert name="footerContent">
                        <div class="grayBox" style="text-align: right; color: #666;">
                            <h:outputText style="font-family: Arial,Verdana,sans-serif;font-size: 12px;" value="CHUMS is a MOOC project supported by the SWE Department in Boğaziçi University 2013."></h:outputText>
                        </div>    
                    </ui:insert>
                </p:layoutUnit>

            </p:layout>

        </h:body>
    </f:view>
</html>

